<?php

function p($array){
    dump($array,1,'<pre>',0);
}
//表情替换
function replace_pic($content){
    preg_match_all('/\[.*?\]/is',$content,$arr);
    if($arr[0]){
        $pic = F('pic','','./data/');
        foreach($arr[0] as $v)
        {
            foreach($pic as $key => $value)
            {
                if($v == '['.$value.']'){
                    $content = str_replace($v,'<img src="'.__ROOT__.'/Public/Images/pic/'.$key.'.gif"/>',$content);
                    break;
                }
            }
        }
    }
    return $content;
}
?>